home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / graphic / cheetah.zip / IMAGE.H < prev    next >
C/C++ Source or Header  |  1992-08-20  |  2KB  |  49 lines

  1. #ifndef _IMAGE_H_
  2. #       define _IMAGE_H_
  3. /* image.h                      Image definition.
  4.  * Portability: ANSI
  5.  *                                      (c) erdy 1992
  6.  */
  7. /* Image formats: */
  8. #define ZCompact 0x10
  9. #define Z4Planes 0x20
  10. #define ZPacked  0x40
  11. /* Submodes: */
  12. #define IMG_SUBFRAMED 0x80
  13. #define IMG_FILLBACK  0x100
  14. #define IMG_HEADER    0x1000
  15.  
  16. typedef union Image {
  17.         struct {
  18.                 int            width, height;  /* Sizes of encoded image (subframe) */
  19.                 unsigned int   format;         /* Format of image */
  20.                 void     far  *data;           /* Encoded data */
  21.                 long           size;           /* Size of data */
  22.                 int            x, y;           /* Relative coordinates of subframe */
  23.                 int            twidth, theight;/* Total sizes (full frame) */
  24.                 unsigned char  bg;             /* Background color */
  25.                 unsigned char  ncolormaps;     /* Count of colormaps */
  26.                 unsigned char  counter;        /* delay counter */
  27.                 unsigned char  unused;         /* unused */
  28.                 union Image far *next;         /* Pointer to next image */
  29.         } d;
  30.         char align[0x20];
  31. } Image;
  32. #if (sizeof(Image) % 0x10) != 0
  33. #       error Bad size of Image
  34. #endif
  35. #define SIZE_YIMAGE (sizeof(int)*4+sizeof(void far *)+sizeof(long))
  36. #define ZC_SIGN 0x11
  37. #define ZC_VERS 1               /* Ylib image */
  38. #define SC_VERS 0x11            /* screen lib image */
  39. typedef union {
  40.         char far *data;
  41.         struct {
  42.                 char           manuf;           /* éßÑúñá ZC_SIGN                */
  43.                 char           hard;            /* ê¡Σ«α¼áµ¿∩ « óÑαß¿¿           */
  44.         } vers;
  45. } data_vers;
  46. #define _manuf(p) ((data_vers far *)&(p))->vers.manuf
  47. #define _hard(p) ((data_vers far *)&(p))->vers.hard
  48.  
  49. #endif  _IMAGE_H_